applyDisplay

open fun applyDisplay(gravity: Int, @NonNull display: Rect, @NonNull inoutObj: Rect, layoutDirection: Int)(source)

Apply additional gravity behavior based on the overall "display" that an object exists in. This can be used after apply to place the object within a visible display. By default this moves or clips the object to be visible in the display; the gravity flags DISPLAY_CLIP_HORIZONTAL and DISPLAY_CLIP_VERTICAL can be used to change this behavior.

Parameters

gravity

Gravity constants to modify the placement within the display.

display

The rectangle of the display in which the object is being placed.

inoutObj

Supplies the current object position; returns with it modified if needed to fit in the display.

layoutDirection

The layout direction.

See also